-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix optoe's write_max when using native i2c driver #407
Conversation
Signed-off-by: Prince George <[email protected]>
@bingwang-ms please include this fix in 202405 |
@StormLiangMS please include this fix in 202311 |
@lguohan please review/merge. thanks. |
} | ||
|
||
- dev_dbg(&client->dev, "dev_class: %d\n", optoe->dev_class); | ||
+ dev_dbg(&client->dev, "dev_class: %d use_smbus=%d\n", optoe->dev_class, use_smbus); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to having use_smbus
be logged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor yes the crash is seen on platform using smbus driver so will be good to know the smbus usage in the debug log
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Cherry-pick PR to 202411: #456 |
thanks Mihir and this one is already merged with 202411 -> 202412 code sync: Azure/sonic-linux-kernel.msft@f3f9a37 |
Optoe driver with write-max > 1 when using the i2c message buffer was allocating only 3(1+2) bytes which means while copying the user data for i2c adapters supporting the native i2c functions will overwrite the message buffer size. This will not happen for i2c adapters that does not support native i2c functions like pure SMBUS controller.
MSFT ADO - 28209032